package com.chinatechstar.mq.rabbit;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * RabbitMQ消费者
 * 
 * @版权所有 上海至界信息科技有限公司 
 */
@Component
@RabbitListener(queues = "hello")
public class RabbitReceiver {

	private static int number = 1;

	/**
	 * 接收
	 */
	@RabbitHandler
	public void process(String hello) {
		System.out.println(number++ + ">>>Receiver : " + hello);
	}

}
